.class public Lcom/xingbook/ui/ae;
.super Ljava/lang/Object;


# static fields
.field private static a:Lcom/xingbook/ui/ae;


# instance fields
.field private b:Landroid/content/Context;

.field private c:Landroid/widget/LinearLayout;

.field private d:Landroid/widget/RelativeLayout;

.field private e:Landroid/widget/ImageView;

.field private f:Landroid/widget/TextView;

.field private g:Landroid/widget/RelativeLayout$LayoutParams;


# direct methods
.method private constructor <init>()V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Lcom/xingbook/ui/ae;->b:Landroid/content/Context;

    iput-object v0, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/xingbook/ui/ae;->d:Landroid/widget/RelativeLayout;

    iput-object v0, p0, Lcom/xingbook/ui/ae;->e:Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/xingbook/ui/ae;->f:Landroid/widget/TextView;

    return-void
.end method

.method public static a(Landroid/widget/RelativeLayout;Landroid/app/Activity;)Lcom/xingbook/ui/ae;
    .locals 1

    sget-object v0, Lcom/xingbook/ui/ae;->a:Lcom/xingbook/ui/ae;

    if-nez v0, :cond_0

    new-instance v0, Lcom/xingbook/ui/ae;

    invoke-direct {v0}, Lcom/xingbook/ui/ae;-><init>()V

    sput-object v0, Lcom/xingbook/ui/ae;->a:Lcom/xingbook/ui/ae;

    :cond_0
    sget-object v0, Lcom/xingbook/ui/ae;->a:Lcom/xingbook/ui/ae;

    invoke-direct {v0, p0, p1}, Lcom/xingbook/ui/ae;->b(Landroid/widget/RelativeLayout;Landroid/app/Activity;)V

    sget-object v0, Lcom/xingbook/ui/ae;->a:Lcom/xingbook/ui/ae;

    return-object v0
.end method

.method private b(Landroid/widget/RelativeLayout;Landroid/app/Activity;)V
    .locals 6

    const/4 v2, 0x0

    const/high16 v4, 0x4334

    const/4 v5, -0x2

    if-nez p1, :cond_3

    iget-object v0, p0, Lcom/xingbook/ui/ae;->d:Landroid/widget/RelativeLayout;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/ae;->d:Landroid/widget/RelativeLayout;

    iget-object v1, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout;->removeView(Landroid/view/View;)V

    iget-object v0, p0, Lcom/xingbook/ui/ae;->e:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    check-cast v0, Landroid/graphics/drawable/AnimationDrawable;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->isRunning()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->stop()V

    :cond_0
    iput-object v2, p0, Lcom/xingbook/ui/ae;->d:Landroid/widget/RelativeLayout;

    :cond_1
    if-nez p2, :cond_2

    sput-object v2, Lcom/xingbook/ui/ae;->a:Lcom/xingbook/ui/ae;

    :cond_2
    :goto_0
    return-void

    :cond_3
    invoke-virtual {p2}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/ui/ae;->b:Landroid/content/Context;

    iget-object v0, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    if-nez v0, :cond_4

    invoke-static {p2}, Lcom/xingbook/c/n;->b(Landroid/app/Activity;)F

    move-result v0

    new-instance v1, Landroid/widget/LinearLayout;

    iget-object v2, p0, Lcom/xingbook/ui/ae;->b:Landroid/content/Context;

    invoke-direct {v1, v2}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setOrientation(I)V

    iget-object v1, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    const/16 v2, 0x11

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setGravity(I)V

    new-instance v1, Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xingbook/ui/ae;->b:Landroid/content/Context;

    invoke-direct {v1, v2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/xingbook/ui/ae;->e:Landroid/widget/ImageView;

    iget-object v1, p0, Lcom/xingbook/ui/ae;->e:Landroid/widget/ImageView;

    const v2, 0x7f0201f0

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setBackgroundResource(I)V

    iget-object v1, p0, Lcom/xingbook/ui/ae;->e:Landroid/widget/ImageView;

    new-instance v2, Landroid/widget/LinearLayout$LayoutParams;

    mul-float v3, v4, v0

    float-to-int v3, v3

    mul-float/2addr v4, v0

    float-to-int v4, v4

    invoke-direct {v2, v3, v4}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v1, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lcom/xingbook/ui/ae;->e:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    new-instance v1, Landroid/widget/TextView;

    iget-object v2, p0, Lcom/xingbook/ui/ae;->b:Landroid/content/Context;

    invoke-direct {v1, v2}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/xingbook/ui/ae;->f:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/xingbook/ui/ae;->f:Landroid/widget/TextView;

    const v2, -0xe74f01

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setTextColor(I)V

    iget-object v1, p0, Lcom/xingbook/ui/ae;->f:Landroid/widget/TextView;

    const/4 v2, 0x0

    const/high16 v3, 0x420c

    mul-float/2addr v0, v3

    invoke-virtual {v1, v2, v0}, Landroid/widget/TextView;->setTextSize(IF)V

    iget-object v0, p0, Lcom/xingbook/ui/ae;->f:Landroid/widget/TextView;

    new-instance v1, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v1, v5, v5}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/xingbook/ui/ae;->f:Landroid/widget/TextView;

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    :cond_4
    iget-object v0, p0, Lcom/xingbook/ui/ae;->d:Landroid/widget/RelativeLayout;

    invoke-virtual {p1, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_2

    iget-object v0, p0, Lcom/xingbook/ui/ae;->d:Landroid/widget/RelativeLayout;

    if-eqz v0, :cond_5

    iget-object v0, p0, Lcom/xingbook/ui/ae;->d:Landroid/widget/RelativeLayout;

    iget-object v1, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout;->removeView(Landroid/view/View;)V

    iget-object v0, p0, Lcom/xingbook/ui/ae;->e:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    check-cast v0, Landroid/graphics/drawable/AnimationDrawable;

    if-eqz v0, :cond_5

    invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->isRunning()Z

    move-result v1

    if-eqz v1, :cond_5

    invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->stop()V

    :cond_5
    iput-object p1, p0, Lcom/xingbook/ui/ae;->d:Landroid/widget/RelativeLayout;

    iget-object v0, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v0, p0, Lcom/xingbook/ui/ae;->g:Landroid/widget/RelativeLayout$LayoutParams;

    if-nez v0, :cond_6

    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v0, v5, v5}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    iput-object v0, p0, Lcom/xingbook/ui/ae;->g:Landroid/widget/RelativeLayout$LayoutParams;

    iget-object v0, p0, Lcom/xingbook/ui/ae;->g:Landroid/widget/RelativeLayout$LayoutParams;

    const/16 v1, 0xd

    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    :cond_6
    iget-object v0, p0, Lcom/xingbook/ui/ae;->d:Landroid/widget/RelativeLayout;

    iget-object v1, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lcom/xingbook/ui/ae;->g:Landroid/widget/RelativeLayout$LayoutParams;

    invoke-virtual {v0, v1, v2}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    goto/16 :goto_0
.end method


# virtual methods
.method public a()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/ae;->f:Landroid/widget/TextView;

    const-string v1, ""

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getVisibility()I

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    :cond_0
    iget-object v0, p0, Lcom/xingbook/ui/ae;->e:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    check-cast v0, Landroid/graphics/drawable/AnimationDrawable;

    invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->isRunning()Z

    move-result v1

    if-nez v1, :cond_1

    invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->start()V

    :cond_1
    return-void
.end method

.method public a(Ljava/lang/String;)V
    .locals 2

    if-eqz p1, :cond_2

    iget-object v0, p0, Lcom/xingbook/ui/ae;->f:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :goto_0
    iget-object v0, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getVisibility()I

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    :cond_0
    iget-object v0, p0, Lcom/xingbook/ui/ae;->e:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    check-cast v0, Landroid/graphics/drawable/AnimationDrawable;

    invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->isRunning()Z

    move-result v1

    if-nez v1, :cond_1

    invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->start()V

    :cond_1
    return-void

    :cond_2
    iget-object v0, p0, Lcom/xingbook/ui/ae;->f:Landroid/widget/TextView;

    const-string v1, ""

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0
.end method

.method public b()V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getVisibility()I

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/ui/ae;->c:Landroid/widget/LinearLayout;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    :cond_0
    iget-object v0, p0, Lcom/xingbook/ui/ae;->e:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    check-cast v0, Landroid/graphics/drawable/AnimationDrawable;

    invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->isRunning()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-virtual {v0}, Landroid/graphics/drawable/AnimationDrawable;->stop()V

    :cond_1
    return-void
.end method
